package com.ctgu.j13.controller;

import com.ctgu.j13.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class TestController {

    @Resource
    private TestService service;

    @RequestMapping("/test")
    @ResponseBody    //作为对象返回，不经过视图解析器，如果没加这个东西，默认是跳转页面或视图，
    public String test()
    {
        System.out.println(service.testService());
        return "hello,DeviceManagement!"+service.testService();
    }




}
